home *** CD-ROM | disk | FTP | other *** search
- Path: gail.ripco.com!mambuhl
- From: mambuhl@ripco.com (Martin Ambuhl)
- Newsgroups: comp.lang.c
- Subject: Re: Please please help a
- Date: 16 Feb 1996 22:50:07 GMT
- Organization: Ripco Communications, Inc.
- Message-ID: <4g31mv$2qf@gail.ripco.com>
- NNTP-Posting-Host: golden.ripco.com
-
- tombeck@usemail.com (Thomas Beck)
- in <4fth5k$43v@pacifica.access.ch> asks:
-
- >It's quite embarrassing to ask those two questions, because they seem
- >absolutely stupid (they probably are). Yesterday I started to learn C/C++. I
- >bought a 700 pages book with a cd included that has two compilers on it). I
- >fully understand the chapter about the types, but the things I program just
- >can't be compiled. I extracted the following two problems:
-
- /*
- >int i;
- >int & a=i;
- ^^
- In C, the above is meaningless and should produce a syntax error. While
- legal C++, that is irrelevant in comp.lang.c. There are comp.lang.c++.*
- groups for that. Why your text is introducing aliases early (or else
- why you are skipping the introductory material) escapes me.
-
- >main() {
- >}
-
- /*............*/
- >struct abc {
- > int i;
- > char a;
- > void f1() {
- > };
-
- In C, struct members cannot be functions, although pointers to
- functions are ok.
- If you insist on writing C++, ask your questions in comp.lang.c++, but
- do them the courtesy -- not shown to comp.lang.c -- of retrieving their
- FAQ from rtfm.mit.edu and reading it _before_ posting.
-
- >};
- >
- >main() {
- >}
-
-
- --
- * Martin Ambuhl net: mambuhl@ripco.com
- * Chicago, IL (USA)
-